package com.woniu.orderservice.dao;

import com.sun.mail.imap.protocol.ID;
import com.woniu.orderservice.entity.Orders;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersDao {
    Orders queryById(Integer id);

    List<Orders> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<Orders> findAll();

    List<Orders> queryAll(Orders orders);

    int insert(Orders orders);

    int update(Orders orders);

    int deleteById(Integer id);

    @Select("select * from orders where ordernumber = #{orderNo}")
    Orders selectByOrderNo(String orderNo);
    @Select("select * from orders where positionid=#{id}")
   Orders select(Integer id);

   @Select("select * from orders")
    void createOrder (Orders orders);

    Orders queryAllById(Integer id);

    Orders queryAllByOrderNumber(String queryAllByOrderNumber);



    List<Orders> queryByUserId(Integer userId);

    Orders findOrderByOrderNo(String orderNo);

    List<Orders> queryAllByUserId(Integer userId);
}